* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Helvetica, "PingFang SC", "Microsoft Yahei", sans-serif;
}

main {
  width: 100vw;
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  background: rgb(203, 210, 240);

  .container {
    display: grid;
    width: 60%;
    min-width: 400px;
    box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    padding: 40px 28px;
    background-color: rgb(245, 246, 252);

    // 标题
    h1 {
      text-align: center;
      margin: 24px 0;
      font-size: 38px;
      color: #414873;
      font-weight: bold;
      font-family: "楷体";
    }

    // 添加框
    .input-add {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;

      input {
        padding: 16px 52px 11px 18px;
        border-radius: 12px;
        border: none;
        outline: none;
        box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
        width: 100%;
        font-size: 16px;
        color: #626262;
      }

      button {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        background-color: #ddd6f3;
        background-image: linear-gradient(130deg, #ddd6f3 0%, #c0a5f3 100%);

        border: none;
        outline: none;
        color: white;
        position: absolute;
        right: 0;
        cursor: pointer;

        .plus {
          display: block;
          width: 100%;
          height: 100%;
          background: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
          background-size: 50% 2px, 2px 50%;
          background-position: center;
          background-repeat: no-repeat;
        }
      }
    }

    // 分类
    .filters {
      display: flex;
      margin: 24px 2px;
      color: #c0c2ce;
      font-size: 14px;

      .filter {
        margin-right: 14px;
        transition: 0.8s;
      }

      .filter.active {
        color: #c0a5f3;
        font-weight: 600;
        transform: scale(1.2);
      }
    }

    // 列表
    .todo-list {
      // margin-bottom: 20px;
      display: grid;
      row-gap: 14px;

      .todo-item {
        background: white;
        padding: 16px;
        border-radius: 12px;
        color: #626262;

        label {
          position: relative;
          display: flex;
          align-items: center;

          input {
            margin-right: 16px;
            margin-left: 3px;
            opacity: 0;
          }

          span.check-button {
            position: absolute;
            top: 0;

            &::before,
            &::after {
              content: "";
              display: block;
              position: absolute;
              width: 17px;
              height: 17px;
              border-radius: 50%;
            }

            &::before {
              border: 1px solid #b382f9;
            }

            &::after {
              transition: 0.4s;
              background: #b382f9;
              transform: translate(1px, 1px) scale(0.8);
              opacity: 0;
            }
          }

          // 选中后透明度设置为1
          input:checked + span.check-button::after {
            opacity: 1;
          }
        }
      }
    }
  }
}
